package br.com.imob.ws.service;

import java.util.List;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import br.com.imob.model.Property;
import br.com.imob.model.dao.impl.PropertyDaoImpl;
import br.com.imob.model.util.Filter;

public class PropertyImpl implements PropertyWS {
	
	@Override
	public List<Property> findProperty( Filter filter ){
		
		ApplicationContext context = new ClassPathXmlApplicationContext( "application-context.xml" );
		PropertyDaoImpl propImpl = (PropertyDaoImpl) context.getBean( "propertyDao" );
		
		
		List<Property> list = propImpl.findProperty(filter);
		
		return list;
	}

}
